var request;
 
    function getRequestObject() {
	    if (window.ActiveXObject) {
    		return new ActiveXObject("Microsoft.XMLHTTP");
    	} else if (window.XMLHttpRequest) {
    		return new XMLHttpRequest();
    	} else {
    		return null;
    	}
    }
    
    function sendRequest(nome_servlet) {
    	var parametros = "nome=" + escape(document.form_cadastro.nome.value);
    	parametros += "&sobrenome=" + escape(document.form_cadastro.sobrenome.value);
    	parametros +="&idade=" + escape(document.form_cadastro.idade.value);
    	parametros +="&cpf=" + escape(document.form_cadastro.cpf.value);
    	
    	
    	request = getRequestObject();
    	request.onreadystatechange = handleResponse;
    	request.open("GET", nome_servlet + "?" + parametros, true);
    	request.send(null);
    }

    function handleResponse() {
    	if (request.readyState == 4 && request.status == 200) {
    		document.getElementById("tabela_cadastro").innerHTML = request.responseText;
    	}
    }
